package com.example.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.model.article.dto.ArticleCommentDto;
import com.example.model.article.dto.ArticleHomeDto;
import com.example.model.article.pojo.Article;
import com.example.model.article.vo.ArticleCommnetVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface ArticleMapper extends BaseMapper< Article > {
    List< Article > loadArticle(@Param("articleHomeDto") ArticleHomeDto articleHomeDto, @Param("loadType") Short loadType);
    Map queryLikesAndConllections(@Param(value = "userId") Integer userId, @Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate);
    List< ArticleCommnetVo > getNewsCommentsPage(@Param(value = "articleCommentDto") ArticleCommentDto articleCommentDto, @Param(value = "page") Long page, @Param(value = "pageSize") Long pageSize);
    List< Article > getArticleListByLast5days(@Param(value = "dayParam") Date dayParam);
}
